<?php	 	 
$this->breadcrumbs=array(
	'SAKPA'=>array('admin'),
	$model->nama_data,
);

?>

<h1>SAKPA #<?php	 	  echo $model->id; ?></h1>
<?php	 	  
if(!Yii::app()->user->checkAccess('pemeriksa')){
?>
<?php	 	  $this->widget('bootstrap.widgets.BootButton', array(
        'type'=>'primary',
        'size'=>'mini',
        'label'=>'Ubah Data',
		'url'=>Yii::app()->createUrl('/eAudit/sakpa/update/id/'.$model->id),
    )); ?>
&nbsp;
<?php	 	  $this->widget('bootstrap.widgets.BootButton', array(
        'type'=>'primary',
        'size'=>'mini',
        'label'=>'Buat SAKPA',
		'url'=>Yii::app()->createUrl('/eAudit/sakpa/create'),
    )); ?>
&nbsp;
<?php	 	  $this->widget('bootstrap.widgets.BootButton', array(
        'type'=>'primary',
        'size'=>'mini',
        'label'=>'Pengaturan SAKPA',
		'url'=>Yii::app()->createUrl('/eAudit/sakpa/admin'),
    )); ?>
<br /><br />
<?php	 	  
}//end filter action ubah data, buat laporan, pengaturan laporan
?>
<?php	 	  
$lampirans = explode('#',$model->lampiran);
$i=0;
foreach($lampirans as $lampir):
$lampiran[$i]="<ul><li><a href='".Yii::app()->request->baseUrl."/sakpa/".$lampir."'>".$lampir."</a></li></ul>";
$i++;
endforeach;
$this->widget('bootstrap.widgets.BootDetailView', array(
    'data'=>array('id'=>1, 'firstName'=>'Mark', 'lastName'=>'Otto', 'language'=>'CSS'),
    'attributes'=>array(
		array(
			'name'=>'satker',
			'value'=>Satker::model()->find('satker_kode='.$model->satker)->nama_satker,
		),
		array(
			'name'=>'nama_data',
			'value'=>$model->nama_data,
		),
		array(
			'name'=>'deskripsi_data',
			'type'=>html,
			'value'=>$model->deskripsi_data,
		),
		array(
			'name'=>'status',
			'filter'=>SWHelper::allStatuslistData($model),
			'value'=>substr($model->status,19),
		),
		array(
			'name'=>'pembuat_data',
			'value'=>User::model()->findByPk($model->pembuat_data)->profile->fullname,
			),
		array(
			'name'=>'tanggal_pembuatan',
			'value'=>$model->tanggal_pembuatan,
			),
		array(
            'name' => 'lampiran',
            'type' => 'html',
            'value' =>implode(' ',$lampiran),
        ),
	),
)); ?>
<br />
<?php	 	  
if(!Yii::app()->user->checkAccess('pemeriksa')){
?>
<h2>Histori Pesan</h2>

<?php	 	  
 $dataProvider=new CActiveDataProvider('Pesan', array(
'criteria'=>array(
'condition'=>'id_menu = 2 AND id_laporan='.$model->id,
'order'=>'id DESC',
                        ),
'pagination'=>array(
'pageSize'=>10,
  ),
 ));
$this->widget('zii.widgets.CListView', array(
	'dataProvider'=>$dataProvider,
	'itemView'=>'_message',
)); ?>
<?php	 	 
}//end filter history pesan
?>
